<script type="text/javascript">
$(function () {
	$.ajaxSetup({cache: false});
	$("input[type='text'],textarea").wijtextbox();
	$("input[type='radio']").wijradio();
});

function saveHandle() {
	var parm = $('#editHandleForm').serialize();
	var url = '${contextPath}handle-save.html?time=' + getTime();
	sys_submiting();
	$.ajax({type:'POST', url:url, data:parm,
		success: function(result) {
			sys_submiting_close();
			if (result == 'success') {
				sys_msg('操作成功!');
				loadHandlePage('handle-list');
			} else {
				sys_warning('操作失败!');
			}
		}
	});
}
</script>

<#import "/freemarker/modeltype.ftl" as mt>

<form id="editHandleForm">
	<table class="edit_info_table">
		<tr>
			<td style="width: 100px;">名称</td>
			<td>
				<input type="text" id="name" name="name" value="${(handle.name)!''}" />
				<input type="hidden" id="code" name="code" value="${(handle.code)!''}" />
			</td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>相对路径</td>
			<td><input type="text" id="url" name="url" value="${(handle.url)!''}" /></td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>父操作编号</td>
			<td><input type="text" id="parentCode" name="parentCode" value="${(handle.parentCode)!''}" /></td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>图标路径</td>
			<td><input type="text" id="img" name="img" value="${(handle.img)!''}" /></td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>类型</td>
			<td><@mt.HandleType value=((handle.type)!"") r=true name='type' d='HANDLE' mc=false /></td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>是否删除</td>
			<td><@mt.YesOrNo value=((handle.deleted)!false) r=true name='deleted' d=false mc=false /></td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>是否记录日志</td>
			<td><@mt.YesOrNo value=((handle.recordLog)!false) r=true name='recordLog' d=false mc=false /></td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>操作结果</td>
			<td><input type="text" id="result" name="result" value="${(handle.result)!''}" /></td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>说明</td>
			<td><textarea id="description" name="description" cols="30" rows="5">${(handle.description)!''}</textarea></td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td colspan="2" style="text-align: center;">
				<a href="#" class="link_btn ui-state-default ui-corner-all" onclick="javascript: saveHandle(); return false;">
					<span class="ui-icon ui-icon-disk"></span>&nbsp;保&nbsp;&nbsp;存
				</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<a href="#" class="link_btn ui-state-default ui-corner-all" onclick="javascript: document.getElementById('editHandleForm').reset(); return false;">
					<span class="ui-icon ui-icon-cancel"></span>&nbsp;取&nbsp;&nbsp;消
				</a>
			</td>
			<td>&nbsp;</td>
		</tr>
	</table>
</form>
